package fr.umlv.galcon.ship;

import java.util.ArrayList;
import java.util.List;

import fr.umlv.galcon.planet.Planet;
import fr.umlv.galcon.player.Player;

public class Squadron {

    private Planet originPlanet;
    private Planet destinationPlanet;
    private List<ShipAbstract> squadronList;
    private Player owner;
    private boolean selected;

    /**
     * Constructor
     */
    public Squadron() {
    }

    /**
     * Constructor
     * 
     * @param originPlanet
     *            The Planet where the squadron come from.
     * @param destinationPlanet
     *            The Planet the squadron has to reach.
     * @param owner
     *            The Player who owns the squadron.
     */
    public Squadron(Planet originPlanet, Planet destinationPlanet, Player owner) {
	this.originPlanet = originPlanet;
	this.destinationPlanet = destinationPlanet;
	this.squadronList = new ArrayList<ShipAbstract>();
	this.owner = owner;
	this.selected = false;
    }

    /**
     * Add a Ship to the Squadron list.
     * 
     * @param ship
     *            The Ship to add.
     */
    public void addShip(ShipAbstract ship) {
	this.squadronList.add(ship);
    }

    public Planet getOriginPlanet() {
	return originPlanet;
    }

    public void setOriginPlanet(Planet originPlanet) {
	this.originPlanet = originPlanet;
    }

    public Planet getDestinationPlanet() {
	return destinationPlanet;
    }

    public void setDestinationPlanet(Planet destinationPlanet) {
	this.destinationPlanet = destinationPlanet;
    }

    public List<ShipAbstract> getSquadronList() {
	return squadronList;
    }

    public void setSquadronList(List<ShipAbstract> squadronList) {
	this.squadronList = squadronList;
    }

    public Player getOwner() {
	return owner;
    }

    public void setOwner(Player owner) {
	this.owner = owner;
    }

    public boolean isSelected() {
	return selected;
    }

    public void setSelected(boolean selected) {
	this.selected = selected;
    }

}
